<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function countDown(time) {
            var nowTime = new Date();
            var inputTime = new Date(time);
            var times = (inputTime - nowTime) / 1000;
            var day = parseInt(times / 60 / 60 / 24);
            day = day < 10 ? '0' + day : day;
            var hours = parseInt(times / 60 / 60 % 24);
            hours = hours < 10 ? '0' + hours : hours;
            var min = parseInt(times / 60 % 60);
            min = min < 10 ? '0' + min : min;
            var s = parseInt(times % 60);
            s = s < 10 ? '0' + s : s;
            console.log('倒计时剩余' + day + '天' + hours + '时' + min + '分' + s + '秒');
        }
        countDown('2024-9-13 11:00:00');
    </script>
</head>

<body>

</body>

</html>